Switch ostree source to git
authorFelix Krull <f_krull@gmx.de>
Tue, 25 Aug 2020 17:54:35 +0000 (19:54 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
rust-bindings/rust/Dockerfile
rust-bindings/rust/Makefile

index 99baf7b2b70a3c14edd73b13f4edaeb0a52696fa..2849b5a67e3b1cdb103fe60d4bfce813281b1882 100644 (file)
@@ -1,17 +1,19 @@
 FROM registry.fedoraproject.org/fedora:latest
 
-RUN dnf install -y curl gcc make tar xz 'dnf-command(builddep)'
+RUN dnf install -y gcc git make 'dnf-command(builddep)'
 RUN dnf builddep -y ostree
 
-ARG OSTREE_VER
-ENV OSTREE_SRC=https://github.com/ostreedev/ostree/releases/download/v${OSTREE_VER}/libostree-${OSTREE_VER}.tar.xz
+ARG OSTREE_REPO
+ARG OSTREE_VERSION
 RUN mkdir /src && \
     cd /src && \
-    curl -L -o /ostree.tar.xz ${OSTREE_SRC} && \
-    tar -xa --strip-components=1 -f /ostree.tar.xz && \
-    rm -r /ostree.tar.xz
+    git init . && \
+    git fetch --depth 1 $OSTREE_REPO $OSTREE_VERSION && \
+    git checkout FETCH_HEAD && \
+    git submodule update --init
 RUN mkdir /build && \
     cd /build && \
+    NOCONFIGURE=1 /src/autogen.sh && \
     /src/configure \
         --with-openssl \
         --with-curl \
index a5b5b6953ec5ec0c5c48eb7bdd5aa044a443a265..0b4e863e9f894f9cdea0fd67a2d49f0dcd1b2448 100644 (file)
@@ -1,7 +1,8 @@
 GIR_REPO := https://github.com/gtk-rs/gir.git
 GIR_VERSION := 2d1ffab19eb5f9a2f0d7a294dbf07517dab4d989
+OSTREE_REPO := https://github.com/ostreedev/ostree
+OSTREE_VERSION := v2020.4
 RUSTDOC_STRIPPER_VERSION := 0.1.13
-OSTREE_VER := 2020.4
 
 all: gir
 
@@ -49,7 +50,9 @@ gir-files:
 
 gir-files/OSTree-1.0.gir:
        podman build \
-               --build-arg OSTREE_VER=$(OSTREE_VER) \
+               --pull \
+               --build-arg OSTREE_REPO=$(OSTREE_REPO) \
+               --build-arg OSTREE_VERSION=$(OSTREE_VERSION) \
                -t ostree-build \
                .
        podman run \